package 多无人机架次;

import java.util.ArrayList;

public class DroneTripUpdate {
    public static ArrayList<Object> Method(ArrayList<Object> hub,ArrayList<Integer> RU){
        for(int i = 0;i<1;i++){
            ArrayList<Integer> hubNode = (ArrayList<Integer>) hub.get(i);//先把hub里第i个集合对象拿出来
            if(hubNode.size()==0){
                for(int mj = 0;mj<RU.size();mj++){
                    hubNode.add(RU.get(mj));//将RU集合中的东西 拿出来 放到  hubnode 这个集合中
                }
                hub.set(i,hubNode);
                break;
            }else {
                continue;
            }
        }
        return hub;

    }
/*
    public static void main(String[] args) {
        ArrayList<Integer> RU = new ArrayList<>();
        ArrayList<Object> hub = new ArrayList<>(100);
        ArrayList<Object> drone_trip = new ArrayList<>();
        for(int j=0;j<100;j++){
            hub.add(new ArrayList<Integer>());
        }
        RU.add(1);RU.add(2);

        drone_trip = DroneTripUpdate.Method(hub,RU);
        ArrayList<Integer> diyige = (ArrayList<Integer>) drone_trip.get(0);
        Integer in = diyige.get(0);
        System.out.println(in);
        RU.clear();
        RU.add(22);RU.add(3333);RU.add(4555);RU.add(3333);
        drone_trip = DroneTripUpdate.Method(hub,RU);
        ArrayList<Integer> dierge = (ArrayList<Integer>) drone_trip.get(1);
        Integer inn = dierge.get(2);
        System.out.println(inn);
        RU.clear();


    }

 */
}
